home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / music / 5mods_2.arj / CBVFIX.MOD < prev    next >
Text File  |  1994-01-20  |  6KB  |  181 lines

  1. ┌────────────────────────────────────────────────────────────────────────────┐
  2. │ Mod Name      : CBVFIX-423             Mod Author: ALTAIR 1@14259 WWIVLink │
  3. │ Difficulty    : █▒▒▒▒▒▒▒▒▒                                1@4259  WWIVNET  │
  4. │ WWIV Version  : 4.23                                      1@4204  AERONET  │
  5. │ Mod Date      : 01/03/94                                                   │
  6. │ Files Affected: NEWUSER.C                                                  │
  7. │ Description   : Fix so callback validation doesn't call long distance!     │
  8. │                                                                            │
  9. └────────────────────────────────────────────────────────────────────────────┘
  10.  
  11. ══[ Description ]═════════════════════════════════════════════════════════
  12.     
  13.    Okay, well this is a quick fix so all you need to do is block copy 
  14.    the code below in place of the old code.  Then figure out what 
  15.    exchanges are local calls for your BBS and insert them below.  
  16.    All other exchanges will be blocked out.  There is a lot that can be done
  17.    with this code, but I don't have the time so feel free to expand on
  18.    this mod.....
  19.    
  20. === Existing code.    
  21.  
  22.      open NEWUSER.C and find the following code in int callbak(void)
  23.  
  24.  
  25. ===      if (thisuser.dsl<syscfg.newuserdsl+SYSOPDSL)
  26. ===        thisuser.dsl=syscfg.newuserdsl+SYSOPDSL;
  27. ===      changedsl();
  28. ===      strcpy(thisuser.dataphone,s1);
  29. ===      return(0);
  30. ===    }
  31.  
  32. /* begin block copy */    
  33.     
  34.     if ((strlen(s1) == 8)                       /* This is for local calls. */
  35.       && (s1[0] != '5')                         /* 535 exchange */
  36.       && (s1[1] != '3') 
  37.       && (s1[2] != '5')){
  38.       ok=0;
  39.       ld=0;
  40.       if ((s1[0] == '6')
  41.         && (s1[1] == '5')                       /* 652 exchange */
  42.         && (s1[2] == '2'))
  43.         ok=1;
  44.       if ((s1[0] == '6')
  45.         && (s1[1] == '5')                       /* 654 exchange */
  46.         && (s1[2] == '4'))
  47.         ok=1;
  48.       if ((s1[0] == '6')
  49.         && (s1[1] == '5')                       /* 656 exchange */
  50.         && (s1[2] == '6'))
  51.         ok=1;
  52.       if ((s1[0] == '6')
  53.         && (s1[1] == '5')
  54.         && (s1[2] == '8'))                      /* 658 exchange */
  55.         ok=1;
  56.       if ((s1[0] == '7')
  57.         && (s1[1] == '5')                       /* 752 exchange */
  58.         && (s1[2] == '2'))
  59.         ok=1;
  60.       if ((s1[0] == '7')
  61.         && (s1[1] == '5')                       /* 758 exchange */
  62.         && (s1[2] == '8'))
  63.         ok=1;
  64.       if ((s1[0] == '8')
  65.         && (s1[1] == '4')                       /* 843 exchange */
  66.         && (s1[2] == '3'))
  67.         ok=1;
  68.       if ((s1[0] == '8')
  69.         && (s1[1] == '4')                       /* 846 exchange */
  70.         && (s1[2] == '6'))
  71.         ok=1;
  72.       if ((s1[0] == '8')
  73.         && (s1[1] == '4')                       /* 847 exchange */
  74.         && (s1[2] == '7'))
  75.         ok=1;
  76.       if ((s1[0] == '3')
  77.         && (s1[1] == '6')                       /* 368 exchange */
  78.         && (s1[2] == '8'))
  79.         ok=1;
  80.       if ((s1[0] == '4')
  81.         && (s1[1] == '5')                       /* 452 exchange */
  82.         && (s1[2] == '2'))
  83.         ok=0;
  84.     }
  85.     if ((strlen(s1) == 10)                       /* This is for calls in the */
  86.       && (s1[0] == '1')                          /* same area code that are */
  87.       && (s1[1] == '-')                          /* long distance. */
  88.       && (s1[5] == '-')) {
  89.       ok=0;                                      
  90.       ld=0;
  91.       nl();
  92.       nl();                 /* creat string 1429 and put in it */
  93.       pl(get_string(1429)); /* Sorry, But this is Long Distance from here! */  
  94.   
  95.       nl();                                   
  96.       if ((s1[0] == '9')                       
  97.         && (s1[1] == '1')
  98.         && (s1[2] == '1'))
  99.         ok=0;
  100.       if ((s1[0] == '4')
  101.         && (s1[1] == '1')
  102.         && (s1[2] == '1'))
  103.         ok=0;
  104.     }
  105.     if ((strlen(s1) == 12)                       /* This is not a valid */
  106.       && (s1[3] == '-')                          /* possibility here and */
  107.       && (s1[7] == '-')) {                       /* has not been tested. */
  108.       ok=0;                                      /* It is for numbers in */
  109.       ld=0;                                      /* another area code that */
  110.       nl();
  111.       nl();
  112.       pl(get_string(1429));
  113.       nl();
  114.       if ((s1[0] == '9')                         /* are not long distance. */
  115.         && (s1[1] == '0')
  116.         && (s1[2] == '0'))
  117.         ok=0;
  118.       if ((s1[0] == '9')                         /* Steve Wolf's idea */
  119.         && (s1[1] == '1')
  120.         && (s1[2] == '1'))
  121.         ok=0;
  122.       if ((s1[0] == '4')                         /* Steve Wolf's idea */
  123.         && (s1[1] == '1')
  124.         && (s1[2] == '1'))
  125.         ok=0;
  126.     }
  127.     if ((strlen(s1) == 14)                       /* This is for the */
  128.       && (s1[0] == '1')                          /* traditional long */
  129.       && (s1[1] == '-')                          /* distance number */
  130.       && (s1[5] == '-')                          /* 1-215-296-1529 */
  131.       && (s1[9] == '-')) {
  132.       ok=0;
  133.       ld=0;
  134.       nl();
  135.       nl();
  136.       pl(get_string(1429));
  137.       nl();
  138.       if ((s1[2] == '9')
  139.         && (s1[3] == '0')
  140.         && (s1[4] == '0'))
  141.         ok=0;
  142.       if ((s1[2] == '9')
  143.         && (s1[3] == '1')
  144.         && (s1[4] == '1'))
  145.         ok=0;
  146.       if ((s1[2] == '4')
  147.         && (s1[3] == '1')
  148.         && (s1[4] == '1'))
  149.         ok=0;
  150.     }  
  151. /* end block copy */
  152.  
  153. ===    for (i1=0; i1< strlen(s1)-1; i1++)
  154. ===      if (((s1[i1]<'0') || (s1[i1]>'9')) && (s1[i1] != '-'))
  155. ===        ok=0;
  156. ===
  157. ===    if (!ok) {
  158. ===      printclb(4);
  159. ===    }
  160. ===  } while ((!ok) && (i++<3));
  161.  
  162.  
  163.       save and recompile.  That should do it, let me know if you have any 
  164.       problems with this Fix.  Also Remember to creat the new string.
  165.  
  166.  
  167.  You can call my BBS:
  168.  
  169.             Into The Night
  170.             412-758-2456
  171.             300-14.4k
  172.  
  173.     or E-mail me at :
  174.  
  175.             1@14259  WWIVLINK   
  176.             1@4259   WWIVNET
  177.             1@4204   AERONET
  178.  
  179.  
  180.  
  181.